Skip to content

Allow to configure a different metamodel#449

Merged
AlexanderLanin merged 5 commits into
eclipse-score:mainfrom
etas-contrib:alt-metamodel
May 11, 2026
Merged

Allow to configure a different metamodel#449
AlexanderLanin merged 5 commits into
eclipse-score:mainfrom
etas-contrib:alt-metamodel

Conversation

@a-zw
Copy link
Copy Markdown
Contributor

@a-zw a-zw commented Mar 24, 2026

Fixes #415

📌 Description

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 24, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.4.2) and connecting to it...
INFO: Invocation ID: ce66b71e-f4d6-43c8-bb50-b4edc162b748
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
WARNING: Target pattern parsing failed.
ERROR: Skipping '//src:license-check': no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
ERROR: no such target '//src:license-check': target 'license-check' not declared in package 'src' defined by /home/runner/work/docs-as-code/docs-as-code/src/BUILD
INFO: Elapsed time: 5.094s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@github-actions
Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

@a-zw a-zw marked this pull request as ready for review April 13, 2026 12:00
@a-zw
Copy link
Copy Markdown
Contributor Author

a-zw commented Apr 13, 2026

Chat with Max: Looks like the right direction.

Wait until after 0.7 release before merging this.

Copy link
Copy Markdown
Contributor

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions, but overall looks good and seems like a good feature to add.

Comment thread src/extensions/score_metamodel/tests/test_metamodel__init__.py Outdated
Comment thread src/extensions/score_metamodel/tests/test_metamodel__init__.py Outdated
Comment thread src/extensions/score_metamodel/yaml_parser.py
Comment thread docs.bzl Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for loading a custom metamodel.yaml for the score_metamodel Sphinx extension, primarily to enable downstream/internal reuse with extended metamodels and checks (Issue #415).

Changes:

  • Make load_metamodel_data() accept an optional YAML path and wire it through the Sphinx extension via a new score_metamodel_yaml config value.
  • Plumb a new metamodel parameter through the Bazel docs() macro and the incremental build driver so the custom YAML can be selected at build time.
  • Document the new macro parameter and add a targeted unit test for explicit-path loading.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/incremental.py Reads SCORE_METAMODEL_YAML and forwards it to Sphinx as score_metamodel_yaml.
src/extensions/score_metamodel/yaml_parser.py Allows loading metamodel data from a caller-provided path (defaults to bundled YAML).
src/extensions/score_metamodel/init.py Adds score_metamodel_yaml config value and loads metamodel from override path when set.
src/extensions/score_metamodel/tests/test_metamodel_load.py Adds test verifying explicit YAML path is honored.
docs.bzl Adds metamodel arg and threads it into Bazel-driven doc targets.
docs/reference/bazel_macros.rst Documents new metamodel argument for docs() macro.
docs/how-to/setup.md Updates docs() parameter table to include metamodel (and related params).

Comment thread docs.bzl
Comment thread docs/reference/bazel_macros.rst
@AlexanderLanin AlexanderLanin merged commit 290bb1e into eclipse-score:main May 11, 2026
12 of 13 checks passed
@AlexanderLanin AlexanderLanin deleted the alt-metamodel branch May 11, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Extensible metamodel

4 participants